package pro.cherish.knowledgeormmysql.config.mybatis.typeHandler;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *
 *
 * @author lys
 * @email cherish_lailai@163.com
 * @date 2020-05-26 16:48:20
 */
@Getter
@Setter
@ApiModel("消息接收实体")
@TableName(value = "msg_receive", autoResultMap = true)
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MsgReceive implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 消息接收表主键
	 */
	@TableId("ID")
	private String id;

	/**
	 * 消息id
	 */
	@ApiModelProperty("消息id")
	private String msgId;

	/**
	 * 接收用户id
	 */
	@ApiModelProperty("接收用户id")
	private String receiveUserId;

	/**
	 * 是否已读
	 */
	@ApiModelProperty("是否已读")
	private Integer alreadyRead;

	/**
	 * 创建时间
	 */
	@ApiModelProperty("创建时间")
	private Date createTime;

	/**
	 * 发送方用户id
	 */
	@ApiModelProperty("发送方用户id")
	private String fromUserId;

	@TableField(typeHandler = JsonTypeHandler.class)
	private Test test;

	@TableField(typeHandler = JsonTypeHandler.class, jdbcType = JdbcType.VARCHAR)
	private List<Test> testList;


}
